home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / p4 / p4-1_2a.lha / p4-1.2a / messages_f / simpglob.f < prev    next >
Text File  |  1992-10-19  |  955b  |  52 lines

  1.       program systest
  2.  
  3.       include 'p4f.h'
  4.  
  5.       call p4init()
  6.       if (p4myid() .eq. 0) then
  7.           call p4crpg()
  8.       endif
  9.       call fslave()
  10.       call p4cleanup()
  11.       print *,'exiting pgm'
  12.       end
  13.  
  14.  
  15.       subroutine fslave()
  16.  
  17.       include 'p4f.h'
  18.  
  19.       character*40 buffer
  20.       integer ASIZE
  21.       parameter (ASIZE = 10)
  22.       double precision  a(ASIZE)
  23.       integer procid, itype, iasize, idblsize, ip4dbl, rc
  24.  
  25.       procid = p4myid()
  26.  
  27.       print 200,'slave ',procid,' has started'
  28.  200  format(a,i2,a)
  29.       call p4flush
  30.  
  31.       do 10 i = 1,ASIZE
  32.           a(i) = i
  33.  10   continue
  34.  
  35.       itype = 44
  36.       iasize = ASIZE
  37.       idblsize = 8
  38.       ip4dbl = P4DBL
  39.       call p4globop(itype,a,iasize,idblsize,p4dblsumop,ip4dbl,rc)
  40.  
  41.       do 20 i = 1,ASIZE
  42.           print 300,a(i)
  43.           call p4flush
  44.  20   continue
  45. 300   format(f4.0)
  46.  
  47.       print 500,'slave ',procid,' is exiting'
  48.  500  format(a,i2,a)
  49.       call p4flush
  50.  
  51.       end
  52.